/******************************************************************************
* File description: OpenFileOthersFileUploadUI.h
* Function: 上传文件UI
* Current Version: 1.0.0
* Author: 张宇轩
* Date: 2024-08-07
*  -----
*  Copyright by 博坤生物 .
 *****************************************************************************/
#ifndef OPENFILEOTHERSFILEUPLOADUI_H
#define OPENFILEOTHERSFILEUPLOADUI_H

#include <QObject>
#include <QQuickWidget>
#include <QQmlContext>

class OpenFileOthersFileUploadUI : public QQuickWidget
{
    Q_OBJECT

signals:
    // 发送设备类型
    void sendDeviceType(QString deviceType);
    // 选择文件
    void selectFile();
    // 发送文件路径
    void sendFilePath(QString filePath);
    // 发送确认信号
    void submit(QString uploadTableData, QString analyDevice);

private slots:
    // 取消
    void onCancel();
    // 确定
    void onSubmit(QString uploadTableData, QString analyDevice);

public:
    OpenFileOthersFileUploadUI();
    ~OpenFileOthersFileUploadUI();

public:
    QQmlContext* getContext() const; // 获取qmlcontext
    QObject* getRootObject() const; // 获取rootObject
    // 获取文件路径
    void filePath(QString filePath);

private:
    QObject *_rootObj;
    QQmlContext *_rootContext;
};

#endif // OPENFILEOTHERSFILEUPLOADUI_H
